package com.mtsmda.preparationforjavainterview.jinterview;

import java.util.ArrayList;
import java.util.List;

public class StaticInitClassAndNonStaticInit {

	private Integer age;
	private String name;
	private static List<String> strings;

	private static int count = 0;

	public StaticInitClassAndNonStaticInit() {

	}

	static {
		System.out.println("Static block");
		strings = new ArrayList<String>();
		for (int i = 0; i < 10; i++) {
			strings.add(i + " c");
		}
	}

	{
		System.out.println("Non static block");
		count++;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getStrings() {
		return strings;
	}

	@Override
	public String toString() {
		return "StaticInitClassAndNonStaticInit [age=" + age + ", name=" + name
				+ "] + Count - " + count;
	}

}